﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

// NOTE: If you change the class name "NorthwindService" here, you must also update the reference to "NorthwindService" in Web.config.
public class NorthwindService : INorthwindService
{
    public List<Product> GetProducts(string productNamePrefix)
    {
        //System.Threading.Thread.Sleep(250);
        NorthWindDataContext db = new NorthWindDataContext();
        var q = from p in db.Products
                where p.ProductName.StartsWith(productNamePrefix)
                select p;
        return q.ToList();
    }

}
